<div class="clients view">
<h2><?php  __('Client');?></h2>
	<dl><?php $i = 0; $class = ' class="altrow"';?>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['id']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Name'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['name']; ?>
			&nbsp;
		</dd>
                <dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Address'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['unit']."/".$client['Client']['street number'].", ".$client['Client']['street'].", ".$client['Client']['suburb'].", ".$client['Client']['state'].", ".$client['Client']['postcode']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Website'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['website']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Business Nature'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['business nature']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Server Hardware'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['server hardware']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('End User Hardware'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['end user hardware']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Peripherals'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['peripherals']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Network Setup'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['network setup']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Software'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['software']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Exchange'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['exchange']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Current Problem'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['current problem']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Common Problems'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['common problems']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Current Maintenance'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['current maintenance']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Future Direction'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['future direction']; ?>
			&nbsp;
		</dd>
		<dt<?php if ($i % 2 == 0) echo $class;?>><?php __('Notes'); ?></dt>
		<dd<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $client['Client']['notes']; ?>
			&nbsp;
		</dd>
	</dl>
<div class="right">
<br /> <br />
		<?php echo $this->Html->link(__('Edit Client', true), array('action' => 'edit', $client['Client']['id'])); ?> &nbsp &nbsp &nbsp &nbsp
		<?php echo $this->Html->link(__('Delete Client', true), array('action' => 'delete', $client['Client']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $client['Client']['id'])); ?> &nbsp &nbsp &nbsp &nbsp
		<?php echo $this->Html->link(__('List Clients', true), array('action' => 'index')); ?> &nbsp &nbsp &nbsp &nbsp
</div>
                <br /><br />

	<h3><?php __('Contacts');?></h3>
        <br />
	<?php if (!empty($client['Contact'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Name'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($client['Contact'] as $contact):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $contact['name'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'contacts', 'action' => 'view/'.$contact['id']), array('title'=> 'View contact','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'contacts', 'action' => 'edit/'.$contact['id']), array('title'=> 'Edit a contact','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'contacts', 'action' => 'delete', $contact['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $contact['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>
<div class="right"><?php echo $html->link('New Contact', array('controller' => 'contacts', 'action' => 'add/'.$client['Client']['id']), array('title'=> 'Adding a new contact','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;"));?></div> 
<br /><br />

	<h3><?php __('Audits');?></h3>
        <br />
	<?php if (!empty($client['Audit'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Name'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($client['Audit'] as $audit):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $audit['name'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'audits', 'action' => 'view', $audit['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'audits', 'action' => 'edit/'.$audit['id']), array('title'=> 'Edit an audit','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'audits', 'action' => 'delete', $audit['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $audit['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

<div class="right"><?php echo $this->Html->link(__('New Audit', true), array('controller' => 'audits', 'action' => 'add/'.$client['Client']['id']), array('title'=> 'Adding a new audit','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;"));?></div>

<br /> <br />
	<h3><?php __('Files');?></h3>
        <br />
	<?php if (!empty($client['MyFile'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('File Name'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($client['MyFile'] as $file):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $file['name'];?></td>
			<td class="actions">
		            <?php echo $this->Html->link(__('Download', true), array('controller' => 'my_files', 'action' => 'download/'.$file['id'])); ?>
                            <?php echo $this->Html->link(__('Delete', true), array('controller' => 'my_files', 'action' => 'delete', $file['id']), null, sprintf(__('Are you sure you want to delete %s?', true), $file['name'])); ?>  &nbsp &nbsp &nbsp
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>
<div class="right"><?php echo $this->Html->link(__('Add A File', true), array('controller' => 'my_files', 'action' => 'add/'.$client['Client']['id']), array('title'=> 'Adding a new File','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;"));?> </div>
<br /><br />

	<h3><?php __('Outstanding Tasks');?></h3>
        <br />
	<?php if (!empty($client['OutstandingTask'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Tasks'); ?></th>
		<th><?php __('Done'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($client['OutstandingTask'] as $outstandingTask):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $outstandingTask['tasks'];?></td>
			<td><?php echo $outstandingTask['done'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'outstanding_tasks', 'action' => 'view/'.$outstandingTask['id']), array('title'=> 'View an task','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'outstanding_tasks', 'action' => 'edit/'.$outstandingTask['id']), array('title'=> 'Edit a task','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'outstanding_tasks', 'action' => 'delete', $outstandingTask['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $outstandingTask['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>
<div class="right"><?php echo $this->Html->link(__('New Outstanding Task', true), array('controller' => 'outstanding_tasks', 'action' => 'add/'.$client['Client']['id']), array('title'=> 'Adding a new task','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;"));?></div>
<br /> <br />

	<h3><?php __('Timesheets');?></h3>
        <br />
	<?php if (!empty($client['Timesheet'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Date'); ?></th>
		<th><?php __('Paid'); ?></th>
		<th><?php __('Status'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($client['Timesheet'] as $timesheet):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $timesheet['date'];?></td>
			<td><?php echo $timesheet['paid'];?></td>
			<td><?php echo $timesheet['status'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'timesheets', 'action' => 'view/'.$timesheet['id']), array('title'=> 'View Timesheet','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Edit', true),array('controller' => 'timesheets', 'action' => 'edit/'.$timesheet['id']), array('title'=> 'Edit Timesheet','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;")); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'timesheets', 'action' => 'delete', $timesheet['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $timesheet['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>
<div class="right"><?php echo $this->Html->link(__('New Timesheet', true), array('controller' => 'timesheets', 'action' => 'add/'.$client['Client']['id']), array('title'=> 'Adding a new Timesheet','onclick'=> "Modalbox.show(this.href, {title: this.title, width: 500}); return false;"));;?></div>
<br /><br />

</div>
